/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1680394290382_721';

  // add your middleware config here
  config.middleware = [];
  config.mysql = {
    client: {
      host: '127.0.0.1',
      port: '3306',
      user: 'root',
      password: '123456',
      database: 'share',
    },
  };
  config.security = {
    csrf: {
      enable: false,
    },
  };
  config.jwt = {
    secret: 'wzskyline_secret_key',
  };
  config.cors = {
    origin: '*',
    allowMethods: 'GET, PUT, POST, DELETE, PATCH',
  };
  // config.multipart = {
  //   mode: 'file',
  //   fileExtensions: [
  //     '.json', '.js', '.vue', '.ts', '.css', '.scss',
  //   ],

  // };

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  return {
    ...config,
    ...userConfig,
  };
};
